package com.yingxin.yxerp.module.activiti.vo.resp;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yingxin.yx.framework.commons.activiti.def.*;
import com.yingxin.yx.framework.commons.vo.CommonRespVo;
import com.yingxin.yxerp.module.easypoi.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;
import java.util.List;

/**
 * 表单
 * @author fanchao
 * @since 2021-10-18
 */

@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "ActivitiFormRespVo对象", description = "表单")
public class ActivitiFormRespVo extends CommonRespVo {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "表单id ")
    private String id;

    @Excel( name = "表单名称", width = 60 )
    @ApiModelProperty(value = "表单名称 ")
    private String name;

    @JsonFormat
    private String approvalFormMetaContent;

    // META 前端需要的数据格式
    private List<ApprovalFormMeta> approvalFormMetaList;

    @JsonFormat
    private String conditionMetaContent;

    // META 前端需要的数据格式
    private List<ConditionMeta> conditionMetaList;

    // META 前端需要的数据格式
    private List<TaskActionDef> actionMetaList;

    @JsonFormat
    private String processDefinitionId;

    @ApiModelProperty(value = "版本 ")
    @Excel( name = "版本", width = 20 )
    private String processVersion;

    // xml 内容
    @JsonFormat
    private String bpmnContent;

    // 用户任务存一个对象
    @JsonFormat
    private String bpmnTask;

    // 流程条件存一个对象
    @JsonFormat
    private String bpmnConditionExpression;

    // 这个是前端说他需要的数据，编辑时要返回
    private String bpmnGraphData;

    // task
    private List<TaskDef> tasks;

    private List<ConditionExpression> conditionExpressions;

    @ApiModelProperty(value = "维护人")
    @Excel( name = "维护人", width = 20 )
    protected String updaterName;

    @ApiModelProperty("维护时间")
    @Excel( name = "维护时间", exportFormat = "yyyy-MM-dd HH:mm", timezone = "GMT+8", width = 30 )
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    protected Date updateTime;

}